Sync UTS specs with 6.1.0 server-side resumability - #511
Conversation
6f8fd80 to
3406716
Compare
|
@ttypic how are we tracking now the spec version that each library implements (especially those that have UTS-based test suites)? |
RTN16g3 - implemented. Replaces RTN16g2, which listed SUSPENDED among the states where createRecoveryKey returns null. RTN8d and RTN9d now keep the connectionKey through SUSPENDED because RTN14h always attempts a resume, so the connection is still recoverable there and the key has to be available to hand to another client. Withholding it left the SDK holding a usable recovery key it would not surface, in the one prolonged-outage state where handing recovery over is most useful. RTN16g3 is not yet in the published specification - ably/specification#511 adds it and tombstones RTN16g2. Implemented ahead of that merging because it is the direct consequence of RTN14h in the previous commit, and shipping the two apart would mean two behaviour changes for callers instead of one. ably-js already behaves this way, from 2.27.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Feels like RTN27d could be in the scope of this PR as I believe it's a relic of the pre-RTN14h days, as theoretically an SDK could become "suspended" but the server may well still have the information it needs to resume when it comes back? That is also the basis on which ably-js implemented it. |
RTN16g3 - implemented. Replaces RTN16g2, which listed SUSPENDED among the states where createRecoveryKey returns null. RTN8d and RTN9d now keep the connectionKey through SUSPENDED because RTN14h always attempts a resume, so the connection is still recoverable there and the key has to be available to hand to another client. Withholding it left the SDK holding a usable recovery key it would not surface, in the one prolonged-outage state where handing recovery over is most useful. RTN16i - fixed alongside it. GetChannelSerials filtered on ChannelState.Attached, and RTL3c puts every channel into SUSPENDED when the connection suspends, so the key would have gone out with no channelSerials at all - connection continuity without message continuity, and nothing to tell the caller. Gated on the serial instead, as ably-js does; RTL15b2 already keeps it through SUSPENDED. RTN16g3 is not yet in the published specification - ably/specification#511 adds it and tombstones RTN16g2. Implemented ahead of that merging because it is the direct consequence of RTN14h in the previous commit, and shipping the two apart would mean two behaviour changes for callers instead of one. ably-js already behaves this way, from 2.27.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
RTN16g3 - implemented. Replaces RTN16g2, which listed SUSPENDED among the states where createRecoveryKey returns null. RTN8d and RTN9d now keep the connectionKey through SUSPENDED because RTN14h always attempts a resume, so the connection is still recoverable there and the key has to be available to hand to another client. Withholding it left the SDK holding a usable recovery key it would not surface, in the one prolonged-outage state where handing recovery over is most useful. RTN16i - fixed alongside it. GetChannelSerials filtered on ChannelState.Attached, and RTL3c puts every channel into SUSPENDED when the connection suspends, so the key would have gone out with no channelSerials at all - connection continuity without message continuity, and nothing to tell the caller. Gated on the serial instead, as ably-js does; RTL15b2 already keeps it through SUSPENDED. RTN16g3 is not yet in the published specification - ably/specification#511 adds it and tombstones RTN16g2. Implemented ahead of that merging because it is the direct consequence of RTN14h in the previous commit, and shipping the two apart would mean two behaviour changes for callers instead of one. ably-js already behaves this way, from 2.27.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Spec PR #488 ("Move resumability decisions from the client to the server", specification version 6.1.0) updated features.md and api-docstrings.md but did not update the UTS test-spec sources or address createRecoveryKey's behaviour in SUSPENDED. This brings both in line. features.md: - RTN16g2 is replaced by RTN16g3: createRecoveryKey() no longer returns Null in SUSPENDED. Since the client now retains its connectionKey and always attempts to resume (RTN14h), the connection remains recoverable while suspended. (RTN16g2 as written still listed SUSPENDED, which contradicts RTN8d/RTN9d retaining the key.) - tweak wording of RTN27d (which is one of those "spec points" that shouldn't really be a spec point because it's kindof flavour-text for an enum member rather than specifying behaviour, so I don't think it needs a break) UTS sources: - connection_id_key: RTN8c/RTN9c "id/key null in SUSPENDED" -> RTN8d/RTN9d "id/key retained in SUSPENDED" (connect first, then suspend). - connection_failures: RTN15g "no resume after connectionStateTtl" -> RTN14h "still attempts resume after the TTL", asserting every post-suspension reconnect carries resume=<connectionKey>. - connection_recovery: RTN16g2 -> RTN16g3; the SUSPENDED case now expects a non-null recovery key. - channel_properties: RTL15b1 "channelSerial cleared on suspended" -> RTL15b2 "retained in suspended"; detach/failed cases relabelled. - channel_attach: RTL4j "ATTACH_RESUME set on reattach" -> "not set". - proxy/connection_resume: Test 22 RTN15g/g2 -> RTN14h; the post-TTL reconnect now asserts the resume param is present. - completion-status: matrix updated for RTN8d/RTN9d, RTN14h, RTN16g3, RTL15b2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3406716 to
d0d1c02
Compare
|
oh, I forgot to merge this, sorry
Good point thx, I'll trim off the last clause. (it's one of those "spec points" that shouldn't really be a spec point because it's kindof flavour-text for an enum member rather than specifying behaviour, so I don't think it needs a break) |
Spec PR #488 ("Move resumability decisions from the client to the server") updated features.md and api-docstrings.md but did not update the UTS test-spec sources or address createRecoveryKey's behaviour in SUSPENDED. This brings both in line.
features.md:
UTS sources: